    /**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/11/12
 * Time: 5:00 PM
 */
Ext.define('CT.view.militancia.AddTraGrid', {
    extend: 'Ctc.view.Grid',
    alias: 'widget.gridaddtra',
    store: 'AddTrabajadores',
    initComponent:function(){
        this.callParent(arguments);

        this.store.setParams({militancia_k:this.militancia_k},true);
    },
    buildColumns: function(){
        return [

            {xtype: 'rownumberer'},
            {header: 'Ficha',dataIndex: 'ficha', width: 60},
            {header: 'Nombre', dataIndex: 'nombreap', flex: 2},
            { width: 40, align: 'center', renderer: this._renderEliminar, iconCls:'cancel'}
        ];
    },
    buildTbar: function(){
        return ["Ficha: ",{
            xtype: 'textfield',
            itemId: 'fieldTrabajadores',
            vtype: 'num',
            minLength: 6,
            maxLength: 6,
            enforceMaxLength: true,
            name: 'ficha',
            flex:1
        }];
    },
    _renderEliminar:function(){
        return "<img src='img/icons/16/del.png' style='cursor:pointer'>";
    }
});